# Contributor: Nicolas Lorin <androw95220@gmail.com>
# Maintainer: Bradley Saulteaux <bradsoto@gmail.com>
pkgname=bees
pkgver=0.10
pkgrel=0
pkgdesc="Best-Effort Extent-Same, a btrfs dedup agent"
url="https://github.com/Zygo/bees"
arch="all"
license="GPL-3.0-or-later"
depends="btrfs-progs bash util-linux-misc"
makedepends="btrfs-progs-dev util-linux-dev"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Zygo/bees/archive/v$pkgver.tar.gz
	no-werror.patch
	10-pthread_getname1.patch
	bees.initd
	"

build() {
	make all
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	mv bin "$pkgdir"/
	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname
}

sha512sums="
77a4ae3d66430c2d9dc0351c16c60bad95f21e238fc00f5f5787f55929ba75ee25212ac4bb4a3e4a9419cec27bbcfd2987aa925a54bc2872609b38a698dbedc3  bees-0.10.tar.gz
54dfe7b30ccb75500662001de00a55eca43d813a793f46f2ad062e26826083d593ee7c62ca090eac299285f8d758541754408b657f5d4695d951e08ea2cb8b10  no-werror.patch
3cd163540719b8859e3d9dec0e75284c030f1b9acdd7dfc5cf2ab5f313254f318a16cce254b18dfe928ae5127564d772b850167e89541b83a4f5872ff2835a65  10-pthread_getname1.patch
093bc4c9604a0b28b39069e447d83800c91d0974fe4618ce5e5063e5c816b2d63c1b633710c592d76e8f6367d696283d6fa4a3a9561b09ce62fa28cabf8e55d0  bees.initd
"
